/*
接收两个正整数n<m<10^6,输出1/n^2+1/(n+1)^2+...+1/m^2，保留5位小数
 */

package com.yuan.algorithms.Algorithm_1;

import java.util.Scanner;
public class 子序列的和 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int n = sc.nextInt();
            int m = sc.nextInt();
            double sum = 0;
            for (long i = n; i <= m; i++) {
                sum += (double)1/(i*i);
            }
            System.out.printf("%.5f\n",sum);
        }
    }
    
}
